import request from '@/utils/request'

// 创建cps活动分类
export function createCpsActivityType(data) {
  return request({
    url: '/alipay/cps-activity-type/create',
    method: 'post',
    data: data
  })
}

// 更新cps活动分类
export function updateCpsActivityType(data) {
  return request({
    url: '/alipay/cps-activity-type/update',
    method: 'put',
    data: data
  })
}

// 删除cps活动分类
export function deleteCpsActivityType(id) {
  return request({
    url: '/alipay/cps-activity-type/delete?id=' + id,
    method: 'delete'
  })
}

// 获得cps活动分类
export function getCpsActivityType(id) {
  return request({
    url: '/alipay/cps-activity-type/get?id=' + id,
    method: 'get'
  })
}

// 获得cps活动分类分页
export function getCpsActivityTypePage(query) {
  return request({
    url: '/alipay/cps-activity-type/page',
    method: 'get',
    params: query
  })
}

// 导出cps活动分类 Excel
export function exportCpsActivityTypeExcel(query) {
  return request({
    url: '/alipay/cps-activity-type/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

export function listType(query) {
  return request({
    url: '/alipay/cps-activity-type/list',
    method: 'get',
    params: query
  })
}
